.pragma library
//Art

var tmeple=[4929,6,
            6159,12,
            7390,24,
            8621,30,
            9852,30,
            11082,24,
            12313,12,
            13544,6,
            14775,6,
            16006,30,
            17236,24,
            18467,12,
            22159,12,
            22620,3,
            23389,6,
            23851,12,
            24466,15,
            24620,18,
            25082,21,
            25851,24,
            26312,30,
            27082,33,
            27543,3,
            28312,6,
            28774,12,
            29389,15,
            29543,18,
            30005,21,
            30774,24,
            31235,30,
            32005,33,
            32466,30,
            33235,34,
            33697,21,
            34312,18,
            34466,15,
            34928,12,
            35697,6,
            36159,3,
            36928,33,
            37389,30,
            38159,24,
            38620,21,
            39235,18,
            39389,15,
            39851,12,
            40620,6,
            41082,3,
            41543,0,
            41697,33,
            41774,3,
            44312,24,
            44312,12,
            45542,0,
            46465,27,
            46773,9,
            48004,18,
            48619,0,
            48927,24,
            49235,12,
            50465,24,
            51388,0,
            51696,18,
            52927,9,
            53542,18,
            53850,18,
            54158,30,
            55388,6,
            56312,18,
            56619,30,
            57850,6,
            58465,0,
            58773,24,
            59081,0,
            60312,12,
            61235,6,
            61542,9,
            62773,21,
            63542,33,
            63696,0,
            63850,3,
            66465,24,
            66465,30,
            67235,9,
            67542,9,
            68312,27,
            68927,9,
            69850,33,
            70158,21,
            70773,27,
            71081,27,
            71388,27,
            72158,9,
            72465,9,
            73235,27,
            73850,9,
            74773,33,
            75081,21,
            75696,9,
            76004,27,
            76312,12,
            76312,6,
            77081,27,
            77388,27,
            78158,9,
            78773,27,
            79696,3,
            80004,15,
            80619,9,
            80927,9,
            81235,9,
            82004,27,
            82312,27,
            83081,9,
            83696,3,
            84619,15,
            84927,27,
            85235,9,
            85850,18,
            86158,6,
            86158,30,
            87388,9,
            88619,18,
            89850,27,
            91081,0,
            92312,9,
            93542,18,
            94773,27,
            96004,0,
            97235,18,
            98465,27,
            99696,9,
            100927,0,
            101542,9,
            102158,18,
            102773,27,
            103388,0,
            103696,5,
            104004,9,
            104312,13,
            104619,0,
            104927,31,
            105235,27,
            105542,23,
            105696,23,
            108312,0,
            108312,18,
            109235,3,
            109542,6,
            110465,6,
            110773,9,
            111696,9,
            112004,12,
            112619,12,
            112927,15,
            113235,18,
            114158,21,
            114465,24,
            115388,24,
            115696,27,
            116619,27,
            116927,30,
            117542,3,
            117850,33,
            118158,21,
            118158,15,
            119081,33,
            119388,30,
            120312,30,
            120619,27,
            121542,27,
            122465,24,
            122773,21,
            123081,18,
            124004,15,
            124312,12,
            125235,12,
            125542,9,
            126465,9,
            126773,6,
            127388,5,
            127542,13,
            127696,23,
            127850,31,
            128004,9,
            128004,27,
            128927,30,
            129235,24,
            130158,24,
            130465,12,
            131388,12,
            131696,6,
            132312,6,
            132619,30,
            132927,6,
            133850,6,
            134158,12,
            135081,12,
            135388,24,
            136312,24,
            136619,30,
            137235,30,
            137542,33,
            137850,3,
            137850,33,
            138773,0,
            139081,18,
            140004,0,
            140312,33,
            140312,3,
            141235,0,
            141542,18,
            142158,0,
            142465,18,
            142773,33,
            142773,3,
            143696,0,
            144004,6,
            144004,30,
            144927,0,
            145235,24,
            145235,12,
            145850,21,
            145850,18,
            146465,30,
            146465,24,
            146773,6,
            146773,12,
            147081,24,
            147081,12,
            147388,30,
            147388,6,
            147698,0,
            149031,9,
            150364,18,
            151698,27,
            153031,0,
            154364,9,
            155698,18,
            157031,27,
            158364,0,
            159698,27,
            161031,18,
            162364,9,
            163698,0,
            165069,27,
            166523,18,
            168023,9,
        ]

